<?php #//AJAX PHP PENNY AUCTION v.1.1




#///////////////////////////////////////////////////////////
#//  COPYRIGHT 2009 Aaron Helmlinger ALL RIGHTS RESERVED  //
#///////////////////////////////////////////////////////////

             


               require('./includes/config.inc.php');
                      if(isset($_COOKIE['USERLANGUAGE'])) {
  $USERLANG = $_COOKIE['USERLANGUAGE'];
} else {
  $USERLANG = $SETTINGS['defaultlanguage'];
}
                 $query343454566 = mysql_fetch_array(mysql_query("SELECT * FROM PHPAUCTIONXL_version_1_3 WHERE id=1"));
  
   $pause_auctions_start1 = $query343454566['pause_auctions_start'];
   $pause_auctions_end1 = $query343454566['pause_auctions_end'];
   
    $email_confirmation_activated1 = $query343454566['email_confirmation_activated'];
    $daily_win_limits1 = $query343454566['daily_win_limits'];
    $weekly_win_limits1 = $query343454566['weekly_win_limits'];
    $monthly_win_limits1 = $query343454566['monthly_win_limits'];
    $free_bids_at_sign_up1 = $query343454566['free_bids_at_sign_up'];
    $live_auction_note1 = $query343454566['live_auction_note'];
    $upcoming_auction_note1 = $query343454566['upcoming_auction_note'];
    $closing_auction_note1 = $query343454566['closing_auction_note'];
    $header_announcement1 = $query343454566['header_announcement'];
    $homepage_announcement1 = $query343454566['homepage_announcement'];
    $live_auction_announcement1 = $query343454566['live_auction_announcement'];
    $google_analytics1 = $query343454566['google_analytics'];
    $footer_app1 = $query343454566['footer_app'];
    $payment_gateway1 = $query343454566['payment_gateway'];
    $youtube_url1 = $query343454566['youtube_url'];
    $twitter_url1 = $query343454566['twitter_url'];
    $facebook_url1 = $query343454566['facebook_url'];
    $welcome_message1 = $query343454566['welcome_message'];
    $helpdesk_info1 = $query343454566['helpdesk_info'];
      $footer_copyright1 = $query343454566['footer_copyright'];
#// CALLS CATEGORIES FUNCTION

include $prefix."categories.php";

#// CALLS DATES FUNCTION

include $prefix."includes/dates.inc.php";



#// CALLS USER INFO FUNCTION


	include $prefix."includes/stats.inc.php";
	  


  // GET USERS ONLINE
       	  include $prefix."online.php";
       	  

$users_online_counter = $count15min."&nbsp;".$MGS_2__0064;     	
 
                 

// CREATE DATE

$current_date_time = ActualDate();

// CREATE META TAGS 
                       $USERLANG2 = $SETTINGS['defaultlanguage'];
#// Handle Meta Tags
if( $SETTINGS['descriptiontag'] != '') {
$meta_tag_description = " <META name=description content='";


            if ( $USERLANG2 == 'CN') {
    $meta2bb = $SETTINGS['descriptiontag'];

$meta2bb = str_replace("&amp;", "&", $meta2bb);

$meta_tag_description .= html_entity_decode($meta2bb,ENT_QUOTES,'utf-8');
    }
    
   else {      $meta_tag_description .= stripslashes($SETTINGS['descriptiontag']);
         }
    
    $meta_tag_description .= "'>";
    
}

if( $SETTINGS['keywordstag'] != '') {

      
$meta_tag_keywords = " <META name=keywords content='";
   //    $meta_tag_keywords .= $SETTINGS['keywordstag'];
       
     if ( $USERLANG2 == 'CN') {
    $meta2b = $SETTINGS['keywordstag'];

$meta2b = str_replace("&amp;", "&", $meta2b);

$meta_tag_keywords .= html_entity_decode($meta2b,ENT_QUOTES,'utf-8');

//$meta_tag_keywords .=  stripslashes($meta2a);

    
    }
    
   else
   
     {
           
          $meta_tag_keywords .= stripslashes($SETTINGS['keywordstag']);
     
     }
    
           
    $meta_tag_keywords .= "'>";
}
 
// CREATE LOGO


        if($SETTINGS['logo']) {
  
$logo = "<a href=";
$logo .= $SETTINGS['siteurl'];
$logo .= "index.php? > <img src=images/";
$logo .= $SETTINGS['siteurl'].$SETTINGS['logo'];
$logo .= " border=0 alt='";
$logo .= $SETTINGS['sitename'];
$logo .= "' /></a>"; 
         
        } else {
$logo = "<a href=index.php > <img src=images/your_logo_goes_here.jpg border=0 > </a>";


        }
         
         
         
         
         

 // CREATE TITLE
 
 $page_title = $SETTINGS['sitename'];
 
  $page_title = html_entity_decode($page_title, ENT_QUOTES, 'utf-8');
 // $page_title .= " - ";
 //$page_title .= $page_title;


// CREATE SEARCH FORM
  
$search_form = "<form name=search action=";
$search_form .= $SETTINGS['siteurl'];
$search_form .= "search.php method=GET>";
$search_form .= $MSG_103;
$search_form .=  "           <input type=text name=q size=15 value=";
$search_form .=  htmlspecialchars($q);
 $search_form .=  " /><input type=submit name= value=";
 $search_form .=  $MSG_275;
 $search_form .=  " class=button /></form> ";
 
 
 
 
 
// CREATE GRAPHIC SEARCH FORM
  
 $graphic_search_form = "<FORM ACTION=\"search.php?\" METHOD=GET>
                     <DIV class=SEARCH_BOX_ON >
        
                            

               <INPUT TYPE=text NAME=q class=SEARCH_INPUT_BOX >
                  </DIV> <!-- END SEARCH BOX ON -->     
                      
                       <DIV class=SEARCH_BUTTON >
                       
                 <INPUT TYPE=\"image\" SRC=\"images/search_button$USERLANG.jpg\" BORDER=\"0\" ALT=\"Search\" value=submit >

                 
        
                    </DIV> <!-- END SEARCH BUTTON  -->
                    </FORM> ";
      
// CREATE LINKS

$home_link = "<a href=".$SETTINGS['siteurl']."index.php>".$MSG_501."</a>";



$logout_link = "<a href=".$SETTINGS['siteurl']."logout.php>".$MSG_245."</a>";
$register_link = "<a href=".$SETTINGS['siteurl']."register.php>".$MSG_235."</a>";
$user_login_link = "<a href=".$SETTINGS['siteurl']."user_login.php>".$MSG_259."</a>";   
$forgot_password_link = "<a href=".$SETTINGS['siteurl']."forgotpasswd.php>".$MSG_215."</A>";     
$search_link = "<a href=".$SETTINGS['siteurl']."adsearch.php>".$MSG_199."</A>";
$browse_categories_link = "<a href=".$SETTINGS['siteurl']."browse.php>".$BROWSE_CATEGORIES."</A>";      
$buy_bids_link = "<a href=".$SETTINGS['siteurl']."buybids.php>".$TABS_MENU_BUY_BIDS1."</A>";
$about_us_link = "<a class=SUBMENU href=".$SETTINGS['siteurl']."about_us.php>".$MSG_5085."</A>";
$contact_us_link = "<a href=".$SETTINGS['siteurl']."contact_us.php>".$MSG_25_0086."</A>";
$help_link = "<a href=".$SETTINGS['siteurl']."help.php>".$MSG_148."</A>";
$feedback_link = "<a href=".$SETTINGS['siteurl']."yourfeedback.php>".$MSG_503."</A>";
$privacy_policy_link = "<a class=SUBMENU href=".$SETTINGS['siteurl']."privacy_policy.php>".$PRIVACY_POLICY."</A>";
$terms_and_conditions_link = "<a class=SUBMENU href=".$SETTINGS['siteurl']."terms_and_conditions.php>".$MSG_5086."</A>";
$how_it_works_link = "<a href=".$SETTINGS['siteurl']."how_it_works.php>".$HOW_IT_WORKS."</a>";
$news_link = "<a href=".$SETTINGS['siteurl']."news.php>".$MSG_282."</a>";
$winners_testimonials_link = "<a href=".$SETTINGS['siteurl']."winners_testimonials.php>".$WINNER_TESTIMONIALS."</a>";
$promocode_link = "<a href=".$SETTINGS['siteurl']."promo_code.php>".$REGISETER_PAGE_PROMOCODE."</a>";
$refer_a_link_link = "<a href=".$SETTINGS['siteurl']."refer_a_friend_send.php>".$Refer_A_Friend."</a>";




$live_auction_link = "<a href=".$SETTINGS['siteurl']."live_auctions.php>".$MSG_25_0057."</A>";
$upcoming_auction_link = "<a href=".$SETTINGS['siteurl']."upcoming_auctions.php>".$MSG_AJAX_ADMIN_GRAPHIC_INTERFACE_UPCOMING."</A>";


$edit_profile_link = "<a class=SUBMENU href=".$SETTINGS['siteurl']."edit_data.php>".$EDIT_PROFILE."</A>";
$send_to_a_friend_link = "<a class=SUBMENU href=".$SETTINGS['siteurl']."friend.php>".$MSG_106."</A>";
$item_watch_link = "<a class=SUBMENU href=".$SETTINGS['siteurl']."item_watch.php>".$MSG_472."</A>";
//$your_bids_link = "<a class=SUBMENU href=".$SETTINGS['siteurl']."yourbids.php>".$MSG_620."</A>";
 $your_bids_link = "<a class=SUBMENU href=".$SETTINGS['siteurl']."yourbids.php>".$BID_HISTORY."</A>";
//$your_wins_link = "<a class=SUBMENU href=".$SETTINGS['siteurl']."buying.php>".$MSG_30_0179."</A>";
  $your_wins_link = "<a class=SUBMENU href=".$SETTINGS['siteurl']."buying.php>".$MY_AUCTION_WIN_HISTORY."</A>";
//$your_payments_link = "<a class=SUBMENU href=".$SETTINGS['siteurl']."payments.php>".$MSG_30_0077."</A>";
$your_payments_link = "<a class=SUBMENU href=".$SETTINGS['siteurl']."payments.php>".$MY_AUCTION_PAYMENT_HISTORY."</A>";
// CREATE FOOTER LINKS

$home_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."index.php>".$MSG_501."</a>";
$logout_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."logout.php>".$MSG_245."</a>";
$register_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."register.php>".$MSG_235."</a>";
$user_login_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."user_login.php>".$MSG_259."</a>";   
$forgot_password_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."forgotpasswd.php>".$MSG_215."</A>";     
$search_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."adsearch.php>".$MSG_199."</A>";
$browse_categories_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."browse.php>".$BROWSE_CATEGORIES."</A>";      
$buy_bids_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."buybids.php>".$TABS_MENU_BUY_BIDS1."</A>";
$about_us_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."about_us.php>".$MSG_5085."</A>";
$contact_us_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."contact_us.php>".$MSG_25_0086."</A>";
$help_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."help.php>".$MSG_148."</A>";
$feedback_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."yourfeedback.php>".$MSG_503."</A>";
$privacy_policy_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."privacy_policy.php>".$PRIVACY_POLICY."</A>";
$terms_and_conditions_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."terms_and_conditions.php>".$MSG_5086."</A>";
$how_it_works_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."how_it_works.php>".$HOW_IT_WORKS."</a>";
$news_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."news.php>".$MSG_282."</a>";
$winners_testimonials_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."winners_testimonials.php>".$WINNER_TESTIMONIALS."</a>";
$promocode_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."promo_code.php>".$REGISETER_PAGE_PROMOCODE."</a>";
$refer_a_link_link_footer = "<a class=FOOTERLINKS href=".$SETTINGS['siteurl']."refer_a_friend_send.php>".$Refer_A_Friend."</a>";


// CREATE LOGIN BOX


$header_login_form_complete = "   

<form NAME=login ACTION=login.php method=POST>
".$MSG_003." &nbsp;
<input type=\"text\" name=\"username\" id=\"username\" size=\"10\" MAXLENGTH=\"20\" />&nbsp;
".$MSG_004." &nbsp;
<input type=\"password\" name=\"password\" id=\"password\" size=\"10\" MAXLENGTH=\"20\" />&nbsp;
<input type=\"checkbox\" name=\"rememberme\" value=\"1\" />&nbsp;<label for=\"rememberme\">".$MSG_25_0085."</label>&nbsp;
<input type=\"submit\" name=\"action\" value=".$MSG_275." class=button />
<a href=\"forgotpasswd.php\">".$MSG_215."</a>
</form>

 ";    
 
 
$header_login_form_start = '<form NAME=login ACTION=login.php method=POST>'; 
$header_login_form_username_label = $MSG_003;
$header_login_form_username_input = '<input type="text" name="username" id="username" size="10" MAXLENGTH="20" />'; 
$header_login_form_password_label = $MSG_004; 
$header_login_form_password_input = '<input type="password" name="password" id="password" size="10" MAXLENGTH="20" />'; 
$header_login_form_remember_me_checkbox_and_label = '<input type="checkbox" name="rememberme" value="1" />';
$header_login_form_remember_me_checkbox_and_label .= $MSG_25_0085;
$header_login_form_remember_me_hidden = '<input type="hidden" name="rememberme" value="1" />';
$header_login_form_submit_button = '<input type="submit" name="action" value='.$MSG_275.' class=button />'; 
$header_login_form_forgot_password_link = '<a href="forgotpasswd.php">'.$MSG_215.'</a>'; 
$header_login_form_end = '</form>'; 
 
 
 

 
 
 
    

#// Atuomatically login user is necessary ("Remember me" option

   /*
if(!isset($_SESSION["PHPAUCTION_LOGGED_IN"]) && isset($_COOKIE['PHPAUCTION_RM_ID'])) {
	$query = "SELECT userid FROM PHPAUCTIONXL_rememberme WHERE hashkey='".addslashes($_COOKIE['PHPAUCTION_RM_ID'])."'";
	$res = mysql_query($query);
	if(!$res){
		MySQLError($query);
		exit;
	}elseif(mysql_num_rows($res) > 0){
		$REMEMBER = mysql_fetch_array(mysql_query("SELECT id,email,nick,name FROM PHPAUCTIONXL_users WHERE id=".intval(mysql_result($res,0,"userid"))));
		mysql_error();
		$_SESSION["PHPAUCTION_LOGGED_IN"] = $REMEMBER['id'];
		$_SESSION["PHPAUCTION_LOGGED_EMAIL"] = $REMEMBER['email']; 
		$_SESSION["PHPAUCTION_LOGGED_NAME"] = $REMEMBER['name'];
		$_SESSION["PHPAUCTION_LOGGED_IN_USERNAME"] = $REMEMBER['nick'];
		
		
	}
} */
 $user_id = $_SESSION["PHPAUCTION_LOGGED_IN"];
$user_email =	$_SESSION["PHPAUCTION_LOGGED_EMAIL"];	
$user_real_name = $_SESSION["PHPAUCTION_LOGGED_NAME"];
$user_name = $_SESSION["PHPAUCTION_LOGGED_IN_USERNAME"];

if ($user_id){
 	$REMEMBER1 = mysql_fetch_array(mysql_query("SELECT bids_remaining FROM PHPAUCTIONXL_users WHERE id=$user_id"));
      $user_bids_remaining = $REMEMBER1['bids_remaining'];
  }    
  
  
  
  
  
      
?>
